<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>top</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<style type="text/css">

#search{height: 33px; float:right;margin-right:50px; }
#search .input{border: 1px solid #999999;height: 100%; }
#search input[type=text]{height:86%;border:0px;width: 250px;}
#search div{float: left;}
#search>button{width: 100px;height: 35px;background: #3385ff;color: #fff;border: none;}



a {
text-decoration: none;
}
* {
	margin: 0;
	padding: 0;
}

.clear:after {
	clear: both;
	content: ".";
	display: block;
	height: 0;
	visibility: hidden;
}

nav {
	display: inline-block;
	border: 1px solid #008BCE;
	border-bottom: 1px solid #008BCE;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	margin-left: 200px; margin-top : 50px; -webkit-box-shadow : 1px 1px 3px
	#292929;
	-moz-box-shadow: 1px 1px 3px #008BCE;
	-webkit-box-shadow: 1px 1px 3px #008BCE;
	margin-top: 50px;
}

li {
	list-style: none;
	float: left;
	border-right: 1px solid #008BCE;;
	position: relative;
	/*background: -moz-linear-gradient(top, #fff, #555D5F 2% ,#555D5F 50%,#3E4245 100%); 
background: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), color-stop(2%, #555D5F), color-stop(50%, #555D5F),to(#3E4245));*/
	background: #008BCE;;
}

li:hover {
	/*background: -moz-linear-gradient(top, #fff, #3E4245 2% ,#555D5F 80%,#555D5F 100%); 
background: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), color-stop(2%, #3E4245), color-stop(80%, #3E4245),to(#555D5F));*/
	background: #3E4245;
	-moz-transition: background 1s ease-out;
	-webkit-transition: background 1s ease-out;
}

li a {
	display: block;
	height: 40px;
	line-height: 40px;
	padding: 0 30px;
	font-size: 12px;
	color: #fff;
	text-shadow: 0px -1px 0px #000;
	text-decoration: none;
	white-space: nowrap;
	border-left: 1px solid #999E9F;
	border-top: 1px solid #999E9F;
	-moz-border-top-left-radius: 2px;
	-webkit-border-top-left-radius: 2px;
	z-index: 100;
}

li>a {
	position: relative;
}

li.first a {
	-moz-border-radius-topleft: 4px;
	-moz-border-radius-bottomleft: 4px;
	-webkit-border-top-left-radius: 4px;
	-webkit-border-bottom-left-radius: 4px;
}

li.last {
	border-right: 0 none;
}

dl {
	position: absolute;
	display: block;
	top: 40px;
	left: -25px;
	width: 165px;
	background: #222222;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	-webkit-box-shadow: 1px 1px 3px #292929;
	-moz-box-shadow: 1px 1px 3px #292929;
	z-index: 10;
}

li:hover dl {
	top: 50px;
	display: block;
	width: 145px;
	padding: 10px;
}

dl a {
	background: transparent;
	border: 0 none;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-transition: background 0.5s ease-out;
	-webkit-transition: background 0.5s ease-out;
	z-index: 50;
}

dl a:hover {
	color: #FFF;
	background: #999E9F;
	-moz-transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
	-webkit-transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
}

dd {
	margin-top: -40px;
	opacity: 0;
	width: 145px;
	-webkit-transition-property: all;
	/*-webkit-transition-timing-function: cubic-bezier(5,0,5,0);*/
	-moz-transition-property: all;
	/*-moz-transition-timing-function: cubic-bezier(5,0,5,0);*/
	/*-webkit-transition-delay:5s; 
-moz-transition-delay:5s;*/
}

li:hover dd {
	margin-top: 0;
	opacity: 1;
}

li dd:nth-child(1) {
	-webkit-transition-duration: 0.1s;
	-moz-transition-duration: 0.1s;
}

li dd:nth-child(2) {
	-webkit-transition-duration: 0.2s;
	-moz-transition-duration: 0.2s;
}

li dd:nth-child(3) {
	-webkit-transition-duration: 0.3s;
	-moz-transition-duration: 0.3s;
}

li dd:nth-child(4) {
	-webkit-transition-duration: 0.4s;
	-moz-transition-duration: 0.4s;
}

dt {
	display: none;
	margin-top: -25px;
	padding-top: 15px;
	height: 10px;
}

li:hover dt {
	display: block;
}

.Darrow {
	float: right;
	margin: 18px 10px 0 0;
	border-width: 5px;
	border-color: #FFF transparent transparent transparent;
	border-style: solid;
	width: 0;
	height: 0;
	line-height: 0;
	overflow: hidden;
	cursor: pointer;
	text-shadow: 0px -1px 0px #000;
	-webkit-box-shadow: 0px -1px 0px #000;
	-moz-box-shadow: 0px -1px 0px #000;
}

.arrow {
	margin: 0 auto;
	margin-top: -5px;
	display: block;
	width: 10px;
	height: 10px;
	background: #222222;
	-webkit-transform: rotate(45deg);
	-moz-transform: rotate(45deg);
}
</style>
</head>

<body>
<div class="logo" style="position: absolute;left: 20px;top: 20px">
	 <a href="#"><img  src="../images/logo.jpg" /></a>
	</div>
	<div style="font-size: 10pt; position: absolute;left: 250px;top: 32px;">
		<c:choose>
			<c:when test="${empty sessionScope.user }">
				<a href="<c:url value='/UserLogin.jsp'/>" target="_top" style="text-decoration: none;">登录</a> |&nbsp; 
				<a href="<c:url value='/Regist.jsp'/>" target="_top" style="text-decoration: none;">注册</a>
			</c:when>
			<c:otherwise>
			当前用户：${sessionScope.user.userName }&nbsp;&nbsp;
				<a href="<c:url value='/userquit'/>" target="_top">退出</a>
			</c:otherwise>
		</c:choose>
	</div>

	<c:choose>
		<c:when test="${empty sessionScope.user }">
		<div style="position: absolute; left: 50px;top: 50px">
			<nav>
			<ul class="clear">
				<li class="first"><a href="<c:url value='/jsps/main.jsp'/>"
					target="_top">首页</a></li>
				<li><a href="<c:url value='/booklist'/>" target="body">全部书籍</a>
				</li>
			</ul>
			</nav>
			</div>
		</c:when>
		<c:otherwise>
		<div style="position: absolute; left: 50px;top: 50px">
			<nav>
			
			<ul class="clear">
				<li class="first"><a href="<c:url value='/jsps/main.jsp'/>"
					target="_top">首页</a></li>
				<li><a href="<c:url value='/booklist'/>" target="body">全部书籍</a>
				</li>
				<li><a href="<c:url value='/jsps/cart/list.jsp'/>"
					target="body">我的购物车</a></li>
				<li><a href="<c:url value='/ordermyorder'/>" target="body">我的订单</a>
				</li>
				<li class="last"><a href="#">个人中心</a></li>
			</ul>
			</nav>
			</div>
		</c:otherwise>
	</c:choose>
	

    <div id="search" style="position: absolute; left: 880px;top: 100px">
      <div class="input">
        <input type="text" id="search">
      </div>
     <button>搜索</button>
    </div>

</body>
</html>
